﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using Site_Extractor;
using KnowFirst.Properties;
using Common;
using System.Collections;
using Crawling;
using System.Threading;
using System.Text;
using System.IO;

namespace KnowFirst
{
    static class Program
    {

        public static void OnApplicationExit(object sender, EventArgs e)
        {
            try
            {
                File.Delete(Settings.Default.PathToIndex + @"\write.LOCK");
            }
            catch (Exception ex)
            {
                Console.WriteLine("ERROR : Unable to cleanup, exiting...");
            }
        }


        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {

            Application.ThreadExit += new EventHandler(OnApplicationExit);
        
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
          
            Application.Run(new KnowFirstGUI());
          

        }
    }
}
